// 视图组件
const view = {
  tabs: () => import('@/layouts/tabs'),
  blank: () => import('@/layouts/BlankView'),
  page: () => import('@/layouts/PageView'),
}

// 路由组件注册
const routerMap = {
  login: {
    authority: '*',
    path: '/login',
    component: () => import('@/pages/login'),
  },
  root: {
    path: '/',
    name: '首页',
    redirect: '/login',
    component: view.tabs,
  },
  dashboard: {
    name: 'Dashboard',
    component: view.blank,
  },
  workplace: {
    name: '工作台',
    path: 'workplace',
    meta: {
      icon: 'dashboard',
    },
    component: () => import('@/pages/workplace'),
  },
  analysis: {
    name: '分析页',
    component: () => import('@/pages/dashboard/analysis'),
  },
  employeeManagement: {
    path: 'employeeManagement',
    name: '雇员管理',
    meta: {
      icon: 'idcard',
    },
    component: view.blank,
  },
  employeeCenter: {
    path: 'employeeCenter',
    name: '雇员中心',
    component: () => import('@/pages/quickEntry/employeeCenter'),
  },
  employeeBatchProcessing: {
    path: 'employeeBatchProcessing',
    name: '员工批量处理',
    component: () => import('@/pages/components/batchProcessing/index'),
    invisible: true,
  },
  projectManagement: {
    path: 'projectManagement',
    name: '项目管理',
    meta: {
      icon: 'project',
    },
    component: view.blank,
  },
  projectCenter: {
    path: 'projectCenter',
    name: '项目中心',
    component: () => import('@/pages/projectManagement/projectCenter'),
  },
  socialSecurityFund: {
    path: 'socialSecurityFund/tabs',
    name: '社保公积金',
    meta: {
      icon: 'profile',
    },
    component: view.blank,
  },
  insuredPersonsManagement: {
    path: 'tab1',
    name: '参保人管理',
    component: () => import('@/pages/socialSecurityFund/tabs/tab1'),
  },
  policyLibrary: {
    path: 'tab2',
    name: '政策库',
    component: () => import('@/pages/socialSecurityFund/tabs/tab2'),
  },
  supplierManagement: {
    path: 'tab3',
    name: '供应商管理',
    component: () => import('@/pages/socialSecurityFund/tabs/tab3'),
  },
  socialSecurityFundBill: {
    path: 'tab4',
    name: '账单',
    component: () => import('@/pages/socialSecurityFund/tabs/tab4'),
  },
  laborDisputes: {
    path: 'laborDisputes',
    name: '劳资纠纷',
    meta: {
      icon: 'money-collect',
    },
    component: view.blank,
  },
  laborDisputesManagement: {
    path: 'laborDisputes',
    name: '劳资纠纷管理',
    component: () => import('@/pages/laborDisputes/laborDisputesManagement'),
  },
  taxManagement: {
    path: 'taxManagement',
    name: '个税管理',
    meta: {
      icon: 'calculator',
    },
    component: view.blank,
  },
  comprehensiveReport: {
    path: 'comprehensiveReport',
    name: '综合所得申报',
    component: () => import('@/pages/taxManagement/comprehensiveReport'),
  },
  payPrincipal: {
    path: 'payPrincipal',
    name: '缴纳主体',
    component: () => import('@/pages/taxManagement/payPrincipal'),
  },
  taxPayerInfo: {
    path: 'taxPayerInfo',
    name: '缴税人员信息',
    component: () => import('@/pages/taxManagement/taxPayerInfo'),
  },
  taxPaymentRecords: {
    path: 'taxPaymentRecords',
    name: '个税缴纳记录',
    component: () => import('@/pages/taxManagement/taxPaymentRecords'),
  },
  systemConfig: {
    path: 'systemConfig',
    name: '系统配置',
    meta: {
      icon: 'setting',
    },
    component: view.blank,
  },
  authorityManagement: {
    path: 'authorityManagement',
    name: '权限管理',
    component: () => import('@/pages/systemConfig/authorityManagement'),
  },
  contractingSubjectManagement: {
    path: 'contractingSubjectManagement',
    name: '签约主体管理',
    component: () =>
      import('@/pages/systemConfig/contractingSubjectManagement'),
  },
  contractManagement: {
    path: 'contractManagement',
    name: '合同模板管理',
    component: () => import('@/pages/systemConfig/contractManagement'),
  },
  enterpriseAccountManagement: {
    path: 'enterpriseAccountManagement',
    name: '企业端账号管理',
    component: () => import('@/pages/systemConfig/enterpriseAccountManagement'),
  },
  quickEntry: {
    path: 'quickEntry',
    name: '业务中心',
    meta: {
      icon: 'check-circle-o',
    },
    component: view.blank,
  },
  // employeeBatchProcessing: {
  //   path: 'employeeBatchProcessing',
  //   name: '员工批量处理',
  //   icon: 'check-circle-o',
  //   component: () => import('@/pages/components/batchProcessing/index'),
  // },
  // employeeManagement: {
  //   path: 'employeeManagement',
  //   name: '雇员管理',
  //   icon: 'check-circle-o',
  //   component: () => import('@/pages/quickEntry/employeeManagement'),
  // },
  // projectManagement: {
  //   path: 'projectManagement',
  //   name: '项目管理',
  //   icon: 'check-circle-o',
  //   component: () => import('@/pages/quickEntry/projectManagement'),
  // },
  // socialSecurityFund: {
  //   path: 'socialSecurityFund',
  //   name: '社保公积金',
  //   icon: 'check-circle-o',
  //   component: () =>
  //     import('@/pages/socialSecurityFund/socialSecurityFundList'),
  // },
  uploadExcel: {
    path: 'uploadExcel',
    name: '上传文件',
    icon: 'check-circle-o',
    component: () => import('@/pages/components/uploadExcel'),
  },
  batchProcessing: {
    path: 'batchProcessing',
    name: '批量处理',
    icon: 'check-circle-o',
    component: () => import('@/pages/components/batchProcessing/index'),
  },
  todoOrder: {
    path: 'todoOrder',
    name: '工单',
    meta: {
      icon: 'check-circle-o',
    },
    component: view.blank,
  },
  orderList: {
    path: 'orderList',
    name: '工单管理',
    icon: 'check-circle-o',
    component: () => import('@/pages/todoOrder/orderList'),
  },
  exp403: {
    authority: '*',
    name: 'exp403',
    path: '403',
    component: () => import('@/pages/exception/403'),
  },
  exp404: {
    name: 'exp404',
    path: '404',
    component: () => import('@/pages/exception/404'),
  },
  exp500: {
    name: 'exp500',
    path: '500',
    component: () => import('@/pages/exception/500'),
  },
}
export default routerMap
